<? // init - initialize page

$_SESSION['rand'] = (integer)($_GET['rand']);

//-foreach( $_SESSION as $key=>$val ) echo "SESSION $key = $val<br/>";
//-exit;

// if logged in
if( $_SESSION['login'] ) {
	ajax_exit( 'success', "welcome {$_SESSION['name']}", array( 'login'=>$_SESSION['login'], 'name'=>$_SESSION['name'], 'login_ts'=>$_SESSION['login_ts'] ) );
} else	ajax_exit( 'success', "welcome to Chess Spider ({$_SESSION['rand']}) (".session_id().")" );

exit;

?>
